// Copyright (C) <2018> Zealcomm Inc.
//
// SPDX-License-Identifier: Apache-2.0
#import <Foundation/Foundation.h>
#import <WebRTC/RTCMacros.h>
#import <WebRTC/RTCVideoRenderer.h>
NS_ASSUME_NONNULL_BEGIN
@class IRTCStreamSourceInfo;
@class RTCMediaStream;
/// Base class of all streams in the SDK<br>SDK的所有媒体流的基类。
RTC_EXPORT
@interface IRTCStream : NSObject
// Writable because mediaStream is subscribed after IRTCRemoteStream is created in conference mode.
@property(nonatomic, strong, readwrite) RTCMediaStream* mediaStream;
@property(nonatomic, strong, readonly) IRTCStreamSourceInfo* source;
- (instancetype)init /*NS_UNAVAILABLE*/;
/**
  @brief Attach the stream's first video track to a renderer.<br>将媒体流的第一条视频轨绑定到视频渲染器上。
  @details The render doesn't retain this stream. Using this method is not
  recommended. It will be removed in the future. please use
  [RTCVideoTrack addRenderer] instead.<br>视频渲染器不会保留这条视频流。今后这个方法将被异常，不推荐使用这个方法。请使用[RTCVideoTrack addRenderer]方法。
 */
- (void)attach:(NSObject<RTCVideoRenderer>*)renderer;
/**
  @brief Returns a user-defined attribute dictionary.<br>返回用户定义的属性字典。
  @details These attributes are defined by publisher. P2P mode always return
  empty dictionary because it is not supported yet.<br>这些属性是发布者定义的。P2P模式目前不支持这个功能，所以会返回空字典。
*/
- (NSDictionary<NSString*, NSString*>*)attributes;
@end
NS_ASSUME_NONNULL_END
